{template 'public/header'}
{template 'public/comhead'}
<link rel="stylesheet" type="text/css" href="../addons/zh_gjw/template/public/ygcsslist.css">
<style type="text/css">
    .ygmargin{margin-top: 10px;color: #999;}
</style>
<ul class="nav nav-tabs">
    <span class="ygxian"></span>
    <div class="ygdangq">当前位置:</div>    
    <li class="active"><a href="javascript:void(0);">地摊规则</a></li>
    <li><a href="{php echo $this->createWebUrl('addmarketrule')}">添加地摊规则</a></li>
</ul>
<div class="main">
        <div class="panel panel-default ygdefault">
            <div class="panel-heading wyheader">
                地摊管理&nbsp;>&nbsp;地摊规则
            </div>
            <div class="panel-body" style="padding: 0px 15px;">

              <div class="row">
                <table class="yg5_tabel col-md-12">
                    <tr class="yg5_tr1" style="height: 50px">               
                        <!-- <th class="col-md-1">标题</th>                -->
                        <th class="col-md-1">图片</th>              
                        <th class="col-md-1">规则</th>
                        <th class="col-md-1">创建时间</th>
                        <th class="col-md-2">操作</th>
                    </tr>
                    {loop $item $row}
                    <tr class="yg5_tr2">
                        <!-- <td>{$row['title']}</td> -->
                        <td><img style="width:30px;height:20px;" src="{$_W['attachurl']}{$row['img']}"></td>
                        <td>{php echo mb_substr(strip_tags(htmlspecialchars_decode($row['marketrule'])),0,20,'utf-8')}...</td>
                        <td>{$row['time']}</td>
                        <td>
                            <!-- {if $row['state']==1}
                            <a href="{php echo $this->createWebUrl('openad', array('op' => 'hoty', 'id' => $row['id']))}"><span class="btn ygyouhui2 btn-xs" style="color:green;border:1px solid green;" id="btnx"><input type="hidden" value="{$row['id']}"><input style="border:none;background:none;" type="button" value="启用"></span></a>
                            {elseif $row['state']==0}
                            <a href="{php echo $this->createWebUrl('openad', array('op' => 'hotx', 'id' => $row['id']))}"><span class="btn ygshouqian2 btn-xs" style="color:#ccc;border:1px solid #ccc;" id="btny"><input type="hidden" value="{$row['id']}"><input style="border:none;background:none;" type="button" value="禁止"></span></a>
                            {/if} -->
                            <a href="{php echo $this->createWebUrl('addmarketrule', array('id' => $row['id']))}" class="storespan btn btn-xs">
                                <span class="fa fa-pencil"></span>
                                <span class="bianji">编辑<span class="arrowdown"></span>
                                </span>
                            
                            </a>
                            <a href="javascript:void(0);" class="storespan btn btn-xs" data-toggle="modal" data-target="#myModal{$row['id']}">
                                <span class="fa fa-trash-o"></span>
                                <span class="bianji">删除<span class="arrowdown"></span>
                                </span>
                            </a>
                        </td>
                    </tr>
                    <div class="modal fade" id="myModal{$row['id']}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
                      <div class="modal-dialog" role="document">
                        <div class="modal-content">
                          <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                            <h4 class="modal-title" id="myModalLabel" style="font-size: 20px;">提示</h4>
                          </div>
                          <div class="modal-body" style="font-size: 20px">
                            确定删除么？
                          </div>
                          <div class="modal-footer">
                            <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                                <a href="{php echo $this->createWebUrl('marketrule', array('op' => 'delete', 'id' => $row['id']))}" type="button" class="btn btn-info" >确定</a>
                          </div>
                        </div>
                      </div>
                    </div>
                    
                    {/loop}
                </table>
              </div>
            </div>
        </div>
</div>
<!-- <div class="main">
    <form action="" method="post" class="form-horizontal form" enctype="multipart/form-data" id="invitative">
        <div class="panel panel-default ygdefault">
            <div class="panel-heading wyheader">
                地摊管理&nbsp;>&nbsp;地摊规则
            </div>
            <div class="panel-body">


                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">主办方介绍：</label>
                    <div class="col-sm-9">
                        {php echo tpl_ueditor('marketrule',$item['marketrule']);}
                    </div>
                </div>
            </div>
        </div>
        
        <div class="form-group">
            <input type="submit" name="submit" value="保存设置" class="btn col-lg-3" style="color: white;background-color: #44ABF7;margin-left: 19%" />
            <input type="hidden" name="token" value="{$_W['token']}" />
            <input type="hidden" name="id" value="{$item['id']}" />
        </div>
    </form>
</div> -->
<script type="text/javascript">
    $(function(){
        // $("#frame-14").addClass("in");
        $("#frame-3").show();
        $("#yframe-3").addClass("wyactive");
    })
</script>